import Vue from 'vue'
import App from './App.vue'
import router from './router'
// 引入vant组件样式
import 'vant/lib/index.less'

import {
  Badge, Stepper, Tab, Tabs, Sidebar, SidebarItem,
  Tabbar, TabbarItem, NavBar, Icon, Button, DropdownMenu, DropdownItem, TreeSelect, Cell,
  CellGroup, Card, Grid, GridItem, Tag, Rate, Field, Toast, Swipe, SwipeItem, Form, ContactCard
  , Popup
} from 'vant';
// 关闭vue默认提示
Vue.config.productionTip = false
// 注册的vant组件
Vue.use(Tabbar);
Vue.use(TabbarItem);
Vue.use(NavBar);
Vue.use(Icon);
Vue.use(Button)
Vue.use(DropdownItem)
Vue.use(DropdownMenu)
Vue.use(TreeSelect)
Vue.use(Cell)
// 2
Vue.use(CellGroup)
Vue.use(Card)
Vue.use(Grid)
Vue.use(GridItem)
Vue.use(Tag)
Vue.use(Rate)
Vue.use(Tab);
Vue.use(Tabs);
Vue.use(Sidebar);
Vue.use(SidebarItem);
Vue.use(Stepper);
Vue.use(Badge);
Vue.use(Field)
Vue.use(Toast);
Vue.use(ContactCard)

//轮播图
Vue.use(Swipe);
Vue.use(SwipeItem);
Vue.use(Popup);
Vue.use(Form);

router.beforeEach((to, from, next) => {
  console.log(to, from);
  next()
})

new Vue({
  router,
  render: function (h) { return h(App) }
}).$mount('#app')
